# f = open('e:/python/file1.txt','r')
# print(f)
# print(type(f))
# f.close()
# flist = []
# count = 0
# while True:
#     f = open('e:/python/file1.txt','r')
#     flist.append(f)
#     count += 1
#     print(f'打开文件的个数：{count}')
#     f.close()

# f = open('e:/python/file1.txt','w')
# f.write('hello world')
# f.close()

# f = open('e:/python/file1.txt','w')
# f.write('1111')
#
# f = open('e:/python/file1.txt','a')
# f.write('\n'+'2222')
# f.close()
# f = open('e:/python/file1.txt','r',encoding='utf8 ')
# result = f.read(2)
# print(result)
# f.close()
# f = open('e:/python/file1.txt','r',encoding='utf8 ')
# for line in f:
#     print(f'line = {line}',end='')
# f.close()
f = open('e:/python/file1.txt','r',encoding="utf8")
lines = f.readlines()
print(lines)
f.close()